<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/8/30 0030
  Time: 18:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>酒店管理</title>
    <link rel="stylesheet" type="text/css" href="/css/index.css"/>
    <script src="/js/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/js/lbt.js" type="text/javascript" charset="utf-8"></script>
    <script src="http://api.map.baidu.com/api?v=1.3" type="text/javascript"></script>
    <script src="/js/js/ditu.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/js/index.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="div">
    <!--头1-->
    <div id="head">
        <div id="title">
            <span id="logo"><a href="#shouyebufen">王府井永光酒店</a></span>
            <span class="dh"><a href="#shouyebufen">首页</a></span>
            <span class="dh"><a href="#fangjianyuding">房间预定</a></span>
            <span class="dh"><a href="#jiudianxiangqing">酒店详情</a></span>
            <span class="dh"><a href="#pingjia">评价</a></span>
            <span class="dh"><a href="/user/jump2">我的订单</a></span>

            <span class="dh"><a href="/login.jsp">登录</a>
                <a href="/logout">注销</a>
            </span>
            <span class="dh">
                用户名：${userinfo.username}
            </span>

        </div>
    </div>
    <a href="" name="shouyebufen"></a>
    <div id="headTS">

    </div>

    <!--首页部分-->
    <div id="shouye">
        <div id="lbt">
            <div class="container">
                <!-- 先把第一张图片显示出来 -->
                <img class="on" src="/img/001.jpg" />
                <img src="/img/002.jpg" />
                <img src="/img/003.jpg" />
                <img src="/img/004.jpg" />
                <!-- 左右切换 -->
                <div class="left"><</div>
                <div class="right">></div>
                <!-- 焦点 -->
                <ul>
                    <li class="active"></li>
                    <li></li>
                    <li></li>
                    <li></li>
                </ul>
            </div>
        </div>
        <div id="shouye_right">
            <p id="shouye_bt">王府井永光酒店</p>
            <p>
                <span id="pf">5.0分</span>
                <span id="hp">100%好评</span>
            </p>
            <p>
                <span class="td">位置优越</span>
                <span class="td">性价比高</span>
                <span class="td">环境舒适</span>
            </p>
            <p>酒店地址：湖北省武汉市外滩十八号</p>
            <p>客服电话：888-888-888</p>
        </div>
    </div>

    <!--房间预定-->
    <a href="" name="fangjianyuding"></a>
    <div id="fjyd">
        <div id="fjyd_title" style="font-size: 48px;">
            房间预定
        </div>
        <div id="fjyd_content">
            <form action="/kfRoom/kfRoomyd#fangjianyuding">
                <select name="kfTypeId" >
                    <option value="">房型</option>
                    <c:forEach  items="${kfTypes}" var="kft" >
                    <option value="${kft.id}" <c:if test="${kft.id==kfTypeId}">selected</c:if> >${kft.typeName}</option>
                    </c:forEach>
                </select>

                <input type="submit" id="fjyd_cx" value="查询"/>
            </form>
            <table id="fjyd_table">
                <tr id="fjyd_tr">
                    <td>图片</td>
                    <td>房型</td>
                    <td>房间面积</td>
                    <td>早餐</td>
                    <td>活动</td>
                    <td>房价</td>
                    <td>操作</td>
                </tr>
                <c:forEach items="${page.list}" var="k">
                    <tr class="fjyd_xx">
                        <td>
                            <c:forEach items="${kfImgs}" var="i">
                                <c:if test="${k.id==i.kfId}">
                                    <img src="${i.kfImgPath}">
                                </c:if>
                            </c:forEach>
                        </td>
                        <td>
                            <c:forEach items="${kfTypes}" var="kt">
                                <c:if test="${k.kfTypeId==kt.id}">
                                   ${kt.typeName}
                                </c:if>
                            </c:forEach>
                        </td>
                        <td>
                            ${k.kfArea}
                        </td>
                        <td>
                            ${k.kfDesc}
                        </td>
                        <td>
                            <c:forEach items="${hds}" var="h">
                                <c:if test="${k.hdId==h.id}">
                                    ${h.hdDesc}
                                </c:if>
                            </c:forEach>
                        </td>
                        <td class="money">
                            ￥${k.kfHdPrice}
                        </td>
                        <td><a href="/cuser/jump?id=${k.id}">预定</a></td>
                    </tr>
                </c:forEach>
                
                <%--<tr class="fjyd_xx">
                    <td><img src="/img/002.jpg"/></td>
                    <td>经济大床房</td>
                    <td>大床</td>
                    <td>无早餐</td>
                    <td>今天12:00时钱免费取消</td>
                    <td class="money">￥549.0</td>
                    <td><a href="">预定</a></td>
                </tr>--%>
               
                <tr style="height: 100px;">
                    <td colspan="8">
                        <a href="/kfRoom/kfRoomyd?kfTypeId=${kfTypeId}&pageNo=1#fangjianyuding">首页</a>
                        <a href="/kfRoom/kfRoomyd?kfTypeId=${kfTypeId}&pageNo=${page.prePage<=0?1:page.prePage}#fangjianyuding">上一页</a>
                        <c:forEach begin="1" end="${page.pages}" varStatus="i">
                            <a href="/kfRoom/kfRoomyd?kfTypeId=${kfTypeId}&pageNo=${i.count}#fangjianyuding">${i.count}</a>
                        </c:forEach>
                        <a href="/kfRoom/kfRoomyd?kfTypeId=${kfTypeId}&pageNo=${page.nextPage<=0?page.pages:page.nextPage}#fangjianyuding">下一页</a>
                        <a href="/kfRoom/kfRoomyd?kfTypeId=${kfTypeId}&pageNo=${page.pages}#fangjianyuding">尾页</a>
                        <span>${page.pageNum}/${page.pages}页</span>
                        <span>共${page.total}条</span>
                    </td>
                </tr>
            </table>
        </div>
    </div>

    <!--酒店详情-->
    <a href="" name="jiudianxiangqing"></a>
    <div id="jdxq">
        <div style="font-size: 48px;">
            酒店详情
        </div>
        <div id="jdxq_content">
            <table>
                <tr>
                    <th>酒店亮点</th>
                    <td>战略合作酒店，城市销量前列，优质服务保障，提供去哪儿平台专属低价</td>
                </tr>
                <tr>
                    <th>联系方式</th>
                    <td>+861065265558</td>
                </tr>
                <tr>
                    <th>基本信息</th>
                    <td>200间客房</td>
                </tr>
                <tr>
                    <th class="jdxq_jdjj">酒店简介</th>
                    <td>
                        酒店位于市中心王府井地区，周边景点众多，靠近天安门广场、故宫，毗邻王府井步行街、新东方广场仅150米。<br />
                        酒店位置优越，交通便捷。<br />
                        酒店周围汇聚着北京最繁荣的购物、休闲娱乐、餐饮，酒店门口是东华门夜市汇聚各类特色小吃。<br />
                        无论您是去天安门广场看升旗还是去故宫博物院，皇城根遗址公园。<br />
                        酒店房间装修温馨典雅，基础生活设施齐备，将是您理想的温馨的住所，酒店全体员工期待您的光临。
                    </td>
                </tr>
                <tr>
                    <th class="jdxq_jdjj">入离时间</th>
                    <td>
                        入住时间：入住当天14:00后<br />
                        离店时间：离店当天12:00前
                    </td>
                </tr>
                <tr>
                    <th>儿童政策</th>
                    <td>每间客房最多容纳1名0至12岁儿童与成人共用现有床铺</td>
                </tr>
                <tr>
                    <th>宠物</th>
                    <td>不可携带宠物。</td>
                </tr>
                <tr>
                    <th>通用设施</th>
                    <td>
                        <span style="color: #27C8E3;">√</span>电梯&nbsp;&nbsp;&nbsp;
                        <span style="color: #27C8E3;">√</span>空调&nbsp;&nbsp;&nbsp;
                        <span style="color: #27C8E3;">√</span>24小时热水&nbsp;&nbsp;&nbsp;
                        <span style="color: #27C8E3;">√</span>吹风机&nbsp;&nbsp;&nbsp;
                        <span style="color: #27C8E3;">√</span>门禁系统&nbsp;&nbsp;&nbsp;
                        <span style="color: #27C8E3;">√</span>净水机&nbsp;&nbsp;&nbsp;
                        <span style="color: #27C8E3;">√</span>自动售货机
                    </td>
                </tr>
                <tr>
                    <th>清洁服务</th>
                    <td>
                        <span style="color: #27C8E3;">√</span>洗衣服务&nbsp;&nbsp;&nbsp;
                        <span style="color: #27C8E3;">√</span>干衣机&nbsp;&nbsp;&nbsp;
                        <span style="color: #27C8E3;">√</span>洗衣房&nbsp;&nbsp;&nbsp;
                    </td>
                </tr>
            </table>
            <div id="jdxq_dt">
                <div class="ditu" id="map"></div>
            </div>
        </div>
    </div>

    <!--评价-->
    <a href="" name="pingjia"></a>
    <div id="pj">
        <div id="pj_bt">
            <span class="pj_bt_dp pj_dp">点评</span><span class="pj_dp_sl">(2354)</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <!--<span class="pj_bt_dp pj_wd">问答</span><span class="pj_wd_sl">(180)</span>-->
        </div>
        <div id="dp">
<%--aa--%>
            <div id="dpsx">
                <input type="radio" name="sx" value="全部" onclick="eva_tiaojian()" <c:if test="${pj=='全部'}">checked</c:if>/><span class="dpsx_qb">全部</span>
                <input type="radio" name="sx" value="好评" onclick="eva_tiaojian()" <c:if test="${pj=='好评'}">checked</c:if> /><span>好评(${hp_num})</span>
                <input type="radio" name="sx" value="中评" onclick="eva_tiaojian()" <c:if test="${pj=='中评'}">checked</c:if> /><span>中评(${zp_num})</span>
                <input type="radio" name="sx" value="差评" onclick="eva_tiaojian()" <c:if test="${pj=='差评'}">checked</c:if> /><span>差评(${cp_num})</span>
                <span class="dp_rmpx"><a href="/eva/eva_tiaojian?pj=${pj}&px=热门排序#pingjia">热门排序↓</a></span>
                <span class="dp_sjpx"><a href="/eva/eva_tiaojian?pj=${pj}&px=时间排序#pingjia">时间排序↓</a></span>
            </div>

            <c:forEach items="${evaPageInfo.list}" var="e">

            <div class="yhdp">
                <table>
                    <tr>
                        <c:forEach items="${userList}" var="ul">
                            <c:if test="${ul.id==e.userId}"><td rowspan="3" class="yhdp_yhmtp"><img src="${ul.imageUrl}"/></td></c:if>
                        </c:forEach>

                        <td>${e.evaContent}</td>
                    </tr>
                    <tr>
                        <td>
                            <c:if test="${e.evaClass==1}"><span>一颗星</span></c:if>
                            <c:if test="${e.evaClass==2}"><span>二颗星</span></c:if>
                            <c:if test="${e.evaClass==3}"><span>三颗星</span></c:if>
                            <c:if test="${e.evaClass==4}"><span>四颗星</span></c:if>
                            <c:if test="${e.evaClass==5}"><span>五颗星</span></c:if>

                        </td>
                    </tr>
                    <tr>
                        <td>
                            #卫生间干净  #客房干净  #服务很热情  #态度热情  #风格独特。空间体验好  #安全放心  #锁链不错
                            入住体验非常不错，老人很满意，前台和客房服务都很热情。
                        </td>
                    </tr>
                    <tr>
                        <td rowspan="2" class="yhdp_yhm">
                            <c:forEach items="${userList}" var="ul">
                                <c:if test="${ul.id==e.userId}"><span>${ul.username}</span></c:if>
                            </c:forEach>
                       </td>
                        <td class="yhdp_img">
                           <%-- <c:forEach items="${kfRoomList}" var="kl">
                                <c:if test="${kl.id==e.kfId}">
                                    <c:forEach items="${kfImgList}" var="ki">
                                        <c:if test="${ki.kfId==kl.id}">
                                            <img src="${ki.kfImgPath}"/>
                                        </c:if>
                                    </c:forEach>
                                </c:if>
                            </c:forEach>--%>
                            <c:forEach items="${evaImgList}" var="ei">
                                <c:if test="${ei.evaId==e.id}">
                                    <img src="${ei.evaImgPath}">
                                </c:if>
                            </c:forEach>


                        </td>
                    </tr>
                    <tr class="yhdp_zh">
                        <td>
                            <span>时间：${e.evaTime}</span>
                            <span class="yhdp_yy"><span><img src="/img/dianzan.png" class="dianzan"/><img src="/img/dianzan2.png" class="dianzan2"/></span>&nbsp;<span onclick="dz(this)" value="${e.id}">有用${e.dzNum}</span></span>
                            <span class="yhdp_pl"><span><img src="/img/xinxi.png" class="xinxi"/><img src="/img/xinxi2.png" class="xinxi2"/></span>&nbsp;<a href="/eva/pre_eva_reply?id=${e.id}">评论</a></span>
                        </td>
                    </tr>
                </table>
            </div>
            </c:forEach>

            <div id="yhdp_fenye">
                <a href="/eva/eva_tiaojian?pj=${pj}&px=${px}&pageNo=1#pingjia">首页</a>
                <a href="/eva/eva_tiaojian?pj=${pj}&px=${px}&pageNo=${evaPageInfo.prePage<=0?1:evaPageInfo.prePage}#pingjia">上一页</a>
                <c:forEach begin="1" end="${evaPageInfo.pages}" varStatus="i">
                    <a href="/eva/eva_tiaojian?pj=${pj}&px=${px}&pageNo=${i.count}#pingjia">${i.count}</a>
                </c:forEach>
                <a href="/eva/eva_tiaojian?pj=${pj}&px=${px}&pageNo=${evaPageInfo.nextPage<=0?evaPageInfo.pages:evaPageInfo.nextPage}#pingjia">下一页</a>
                <a href="/eva/eva_tiaojian?pj=${pj}&px=${px}&pageNo=${evaPageInfo.pages}#pingjia">尾页</a>
                <span>${evaPageInfo.pageNum}/${evaPageInfo.pages}页</span>
                <span>共${evaPageInfo.total}条</span>
            </div>
        </div>
    </div>

    <!--页脚-->
    <div  style="margin-top: 100px;">
        <img src="img/yejiao.png"/>
    </div>
</div>
</body>
<script type="text/javascript">
   /*function selectByKfType(){
       $.ajax({
           url:  ,
           data:  ,
           type:"POST",
           dataType:"json"
       })
   }*/
   function eva_tiaojian(){
       var elementsByNames = document.getElementsByName("sx");
       for (var i = 0; i <elementsByNames.length; i++) {
           if(elementsByNames[i].checked){
               location.href="/eva/eva_tiaojian?pj="+elementsByNames[i].value+"&px="+"${px}"+"#pingjia"
           }

       }
   }
   function dz(dzEle){
       var evaId = dzEle.getAttribute("value");
       $.ajax({
           url:"/eva/eva_dz",
           data:"evaId="+evaId,
           dataType:"json",
           type:"post",
           success:function (data){
              var dzNum = data.dzNum;
              dzEle.innerText="有用"+dzNum
           }
       })
   }

</script>

</html>

